Glasgow | 26-SDC-JUL | Mirabelle Morah | Sprint 3 | Implement Shell Tools - #620
Glasgow | 26-SDC-JUL | Mirabelle Morah | Sprint 3 | Implement Shell Tools#620mirabellemorah wants to merge 7 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
LonMcGregor
left a comment
There was a problem hiding this comment.
Good start but there is quite a bit of work still to do.
| import { promises as fs } from "node:fs"; | ||
| import process from "node:process"; | ||
|
|
||
| const argv = process.argv.slice(2); |
There was a problem hiding this comment.
Is there a reason you used commander in the cat example, but not here
| } | ||
| } | ||
|
|
||
| const showOnePerLine = flags.includes("-1"); |
There was a problem hiding this comment.
What does the showOnePerLine const do?
There was a problem hiding this comment.
Now showOneLine (line 13), when true it loops through all the files and prints them on a single line if -1 flag is passed (line 39-45), if not they'd print as it often does in multiple columns in vs code
| import { program } from "commander"; | ||
| import { promises as fs } from "node:fs"; | ||
|
|
||
| const argv = process.argv.slice(2); |
There was a problem hiding this comment.
You import the commander program api, but don't use it. Is there a reason for that?
There was a problem hiding this comment.
This has been corrected now to include arguments and options
Removed unnecessary comment lines from wc.js.
|
This looks good now, good work |
Learners, PR Template
Self checklist
Changelist
Used node to implement shell command lines
Task ID: CYF-1150